package com.usian.admin.controller;

import com.usian.admin.AdUserControllerApi;
import com.usian.admin.service.AdUserService;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/login")
@CrossOrigin
public class AdUserController implements AdUserControllerApi {

    @Autowired
    private AdUserService adUserService;


    /**
     * admin端用户登录
     *
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/in")
    public ResponseResult login(@RequestBody  AdUserDto dto) {
        return adUserService.login(dto);
    }
}
